package com.zx.map.controller;


import com.zx.map.service.ThpartyBalanceService;
import com.zx.map.utils.CommonResponseUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * Created by bibei on 2017/4/27.
 * 第三方平台  对账管理
 */
@Controller
@RequestMapping("/manage/thpartyBalance")
public class ThpartyBalanceController {

	@Autowired
	private ThpartyBalanceService thpartyBalanceService;

	/**
	 * 摩宝申请t0取现
	 * @param transAmount
	 * @param accNo
	 * @param accName
	 * @return
	 */
	@RequestMapping("/encashPage")
	public String encashPage(){
		return "/jsp/map/billCheckLog/thparty_balance";
	}

	/**
	 * 摩宝申请t0取现
	 * @param transAmount
	 * @param accNo
	 * @param accName
	 * @return
	 */
	@RequestMapping("/encashMobao")
	@ResponseBody
	public Map<String, Object> encashMobao(String transAmount,String accNo,String accName){
		try {
			return thpartyBalanceService.encashMobao(transAmount, accNo, accName);
		} catch (Exception e) {
			e.printStackTrace();
			return CommonResponseUtils.failureResponse();
		}
	}
}
